﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace landlord2server
{
    public class GamePlayer
    {
        private Guid m_guid;
        private string m_name;
        private int m_gender;
        private int? m_table;
        private int? m_seat;
        private int m_point;
        private bool m_ready;

        public GamePlayer(Guid guid, string name, int gender)
        {
            m_guid = guid;
            m_name = name;
            m_gender = gender;
        }

        public Guid Guid
        {
            get
            {
                return m_guid;
            }
        }

        public string Name
        {
            get
            {
                return m_name;
            }
        }

        public int Gender
        {
            get
            {
                return m_gender;
            }
        }

        public int? Table
        {
            get
            {
                return m_table;
            }
            set
            {
                m_table = value;
            }
        }

        public int? Seat
        {
            get
            {
                return m_seat;
            }
            set
            {
                m_seat = value;
            }
        }

        public int Point
        {
            get
            {
                return m_point;
            }
            set
            {
                m_point = value;
            }
        }

        public bool Ready
        {
            get
            {
                return m_ready;
            }
            set
            {
                m_ready = value;
            }
        }

        public static DataSet CreateDataSet()
        {
            DataSet ds = new DataSet();
            DataTable dt = ds.Tables.Add("Table");
            dt.Columns.Add("Name", typeof(string));
            dt.Columns.Add("Gender", typeof(int));
            dt.Columns.Add("Point", typeof(int));
            return ds;
        }
    }
}
